﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" 
Inherits="System.Web.Mvc.ViewPage<ZXCompany.Models.Entity.ZX_ExpertType>" %>
<%@ Import Namespace="ZXCompany.DBUtil" %>
<%@ Import Namespace="ZXCompany.Models.Entity" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>专家团队分类</h2> 
    <%   
        string HomeAction = Request.QueryString["action"] == null ? "" : Request.QueryString["action"].ToString();
        if (HomeAction != "add")
        { 
    %>
    <div style="width:80%;" class="tabtitle" >
	    <ul id="mytab1">
		    <li class="active">分类管理</li>
		    <li class="normal" onclick="javascript:window.location.href = 'ExpertType.aspx?action=add&zid=0';">分类添加</li>
	    </ul>
    </div>
    <div style="width:80%;">
	    <table style="text-align:center;">
            <tr class="tdodd">
                <th style="background: none repeat scroll 0% 0% rgb(102, 187, 255);" colspan="5"></th>
            </tr>
            <tr style=" height:20px;background: #eeeeff;"><td colspan="5"></td></tr>
            <tr style="background:#8899cc; font-size:14px;">
                <td style="background: #eeeeff; width:10%"></td>
                <td style="width:400px; font-weight:bold; ">类别名称
                </td>
                <td style="width:160px;font-weight:bold;">排序</td>
                <td style="width:160px;"></td>
                <td style="background: #eeeeff; width:10%"></td>
            </tr>
            <%     
                IList<ZX_ExpertType> HPImageList = ViewData["Account_ExpertType"] as IList<ZX_ExpertType>;
                for (int i = 0; i < HPImageList.Count; i++)
                {
            %>
            <tr> 
                <td style="background: #eeeeff; width:10%"></td>
  	            <%--<td width="5%"><% =i +1 %></td>--%>
                <td width="40%" style="background: #fff;"><%=HPImageList[i].etype %></td>
                <td width="15%" style="background: #fff;"><% =HPImageList[i].sort %></td>
                <td width="10%" style="background: #fff;color:#00f">
                    <a href="ExpertType.aspx?action=add&hp_id=<%=HPImageList[i].ID %>">编辑</a> |
                    <a href="ExpertType.aspx?action=del&hp_id=<%=HPImageList[i].ID %>" onclick="if(!confirm('确定删除该专家团队分类么？'))return false;">
                    删除</a> 
                </td>
                <td style="background: #eeeeff; width:10%"></td>
            </tr>
            <%   
                }      
            %>
        </table>
    </div>
    <%
    }
    else
    { 
    %>
    <form action="<%=VirtualPath.getVirtualPath()%>/Account/ExpertType_Edit.aspx" method="post" id="Form1" name="ExpertType_Edit">  
    <div style="width:80%;" class="tabtitle" >
	    <ul id="Ul1">
		    <li class="normal" onclick="javascript:window.location.href = 'ExpertType.aspx';">分类管理</li>
		    <li class="active">分类添加</li>
	    </ul>
    </div>
    <div style="width:80%;">
	    <table class="ta" >
            <tr class="tdodd">
                <th style="background: none repeat scroll 0% 0% rgb(102, 187, 255);" colspan="5"></th>
            </tr>
            <tr><td style="background: #eeeeff; height:20px;" colspan="4"></td></tr>
	        <tr>
                <td style="background: #eeeeff; width:10%"></td>
                <td style=" text-align:center; width:120px; height:40px;">类别名称：</td>
                <td align="left"> 
                    <input class="input_out" style="padding: 2px; width: 450px;" 
                        value="<% =Model.etype %>" name="etype" id="etype" size="40" type="text"/>               
	            </td>
                <td style="background: #eeeeff; width:10%"></td>
            </tr>
	        <tr>
                <td style="background: #eeeeff; width:10%"></td>
                <td style=" text-align:center; height:40px;">类别顺序：</td>
                <td align="left"> 
                    <input class="input_out" style="padding: 2px; width: 450px;" 
                    value="<% =Model.sort %>" name="sort" size="40" type="text"/>

	            </td>
                <td style="background: #eeeeff; width:10%"></td>
            </tr>
            <tr>
                <td style="background: #eeeeff; width:10%"></td>
                <td></td>
                <td style=" text-align:center; height:40px;">
                    <input type="submit" id="infoSave" value="保存" class="input2"/>
                    <input type="hidden" value="<% =Model.ID %>" name="ID" id="ID"/>
                </td>
                <td style="background: #eeeeff; width:10%"></td>
            </tr>
            <tr><td style="background: #eeeeff; height:20px;" colspan="4"></td></tr>
        </table>
    </div>
    </form>    
    <%
    }
    %>
</asp:Content>
